<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/WEB-INF/taglibs/common/taglibs.jsp"%>

<head>
<title><spring:message code="admin.transaction.importtransactiondata.title" /></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="<c:url value="/css/styles.css"/>" />
<script src="<c:url value="/javascripts/common.js"/>"></script>
</head>

<body><%@include file="../top_menu.jsp"%>
<table width=100%>
	<tr>
		<td><%@include file="/WEB-INF/jsp/menu/admin_transaction_menu.jsp"%>
		<br />
		</td>
	</tr>
		<tr>
		<td><%@include file="/WEB-INF/jsp/include/messages.jsp"%>
		<br />
		</td>
	</tr>
</table>
<br />
<br />
<form:form modelAttribute="fileUpload" method="post"
	enctype="multipart/form-data">
	
	<table width=50% class="formTable">

		<tr>
			<td  colspan="2"><spring:message code="admin.transaction.importtransactiondata.label.importtransactiondatafromcsv" />.<br />
			</td>
		</tr>
		<tr class="formHeader">
			<td  colspan="2"><spring:message code="admin.transaction.importtransactiondata.label.importtransactiondata" /></td>
		</tr>
		<c:if test="${not empty message}">
			<tr>
				<td colspan="2"><c:out value="${message}"></c:out><br />
				</td>
			</tr>
		</c:if>
		<tr>
			<td ><form:label for="file" path="file"><spring:message code="admin.transaction.importtransactiondata.label.filetoupload" /></form:label> </td>
			<td><input type="file" name="file" /> <form:errors path="file"
				cssStyle="color:red" /></td>
		</tr>
		<tr class="buttonPanel">
			<td><input type="submit" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="admin.transaction.importtransactiondata.button.import" />" name="import" /> <input
				type="submit" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="admin.transaction.importtransactiondata.button.cancel" />" name="cancel" /></td>
		</tr>
	</table>
	
	<c:if test="${not empty successList}">
		<table>
			<tr>
				<td><spring:message code="admin.transaction.importtransactiondata.label.recordsuccessfullyadded" />.<br />
				<br />
				</td>
			</tr>
			<tr>
				<td><customCom:successfuldata successList="${successList}" /></td>
			</tr>
		</table>
		<br />
	</c:if>
	
	<c:if test="${not empty mixList}">
		<table>
			<tr>
				<td><spring:message code="admin.transaction.importtransactiondata.label.errorsfoundintherecordsbutimported" />.<br />
				<br />
				</td>
			</tr>
			<tr>
				<td><customCom:unsuccessfuldata errorList="${mixList}" /></td>
			</tr>
		</table>
		<br />
	</c:if>
	
	<c:if test="${not empty errorList}">
		<table>
			<tr>
				<td><spring:message code="admin.transaction.importtransactiondata.label.errorsfoundintherecordsnotimported" />.<br />
				<br />
				</td>
			</tr>
			<tr>
				<td><customCom:unsuccessfuldata errorList="${errorList}" /></td>
			</tr>
		</table>
		<br />
	</c:if>

		

</form:form><%@include file="/WEB-INF/jsp/include/footer.jsp"%>
</body>
</html>